Fixed error detection in move_cursor_at_leftmost#434
Conversation
|
Yup, looks like ERROR_INVALID_PARAMETER was moved to InvalidInput a couple months ago rust-lang/rust@b71a3e1 |
|
Thanks. |
|
No idea; I'm not familiar enough with the relevant Windows API. I also don't know why in practice this error appears on Windows Terminal and Alacritty but not cmd.exe |
|
Just confirming that this fixes the issue in Nushell. We'll keep testing, but aren't able to repro the failures we saw before. @gwenn - would you be able to roll out a new rustyline release with this fix? That would let us move to it for the next Nushell release as well. |
|
Unfortunately it seems like other people were having trouble even reproducing the issue in nushell, which surprised me. It's still under investigation. |
|
@Lucretiel we managed to reproduce it this morning, luckily. Looks like this PR addresses the cases we could find. |
|
Thanks you all for your help. |
Fixed error detection in move_cursor_at_leftmost
Code 87 emits an
ErrorKind::InvalidInput, notErrorKind::Other. Fixed the detection here by removing theErrorKinddetection entirely and using a winapi named constant. Fixes #433. See https://github.com/rust-lang/rust/blob/master/library/std/src/sys/windows/mod.rs#L64 for details.